<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
	ob_start();
	session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!-------------- source cho phan text editor ------------>
<script type="text/javascript" src="js template/require.js"></script>
<script type="text/javascript" src="js template/jquery-1.7.2.js"></script>

<!-- load the Aloha Editor core and some plugins -->
<script src="js template/aloha.js"data-aloha-plugins="common/ui,common/format, common/list, common/link, common/highlighteditables">
</script>

<!-- load the Aloha Editor CSS styles -->
<link href="css template/aloha.css" rel="stylesheet" type="text/css" />

<!-- make all elements with class="editable" editable with Aloha Editor -->
<script type="text/javascript">
	 Aloha.ready( function() {
			var $ = Aloha.jQuery;
			$('.noidungHD').aloha();
	 });

</script>
<!---------------------------------------------------------------------->
<!-- css cho phần khung chủ -->
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<link rel="stylesheet" href="styles/custom.css" type="text/css" />

<link rel="stylesheet" type="text/css" href="style sources/ThemHoatDong.css" />
<script>
// JavaScript Document
$(document).change(function(){$("#tenHD").change(function()
{
	tenHD.setCustomValidity(tenHD.validity.patternMismatch ? 
	'Tên hoạt động phải bắt đầu bằng chử và có ít nhất 10 ký tự' : '');
});
});
function checkKP(kp)
{
	kp.setCustomValidity(kp.validity.patternMismatch ? 
	'Kinh phí là số và phải lớn hơn 0' : '');
}
</script>
<title>Untitled Document</title>
</head>
<?php $hdkt ="active"; include("header.html");?>
<div class="wrapper">
	<div class="container">
		<div>
			<form  action="CapNhatHoatDong.php?mahd=<?php echo $_GET['mahd']; ?>" method="post">
				<fieldset>
					<?php
						include("handle/config.php");
						$sql = "SELECT  *  FROM HOATDONG WHERE MAHD='$_GET[mahd]'";
						$result=mysqli_query($con,$sql);
						if($row = mysqli_fetch_array($result))
						{
							echo "<table class='bangTHD'>
										<tr class='legend'>
											<td colspan='2' align='center' >Thông tin hoạt động</td>
										</tr>
										<tr>
											<td id='firstcol'>Tên hoạt động</td>
											<td>$row[TENHD]</td> <!-- required k duoc bo trong-->
										</tr>
										<tr>
											<td id='firstcol'>Thời gian diển ra </td>
											<td>$row[NGAYDIENRA]</td>
										  </tr>
										<tr>
											<td id='firstcol'>Kinh phí</td>
											<td>$row[KINHPHI]</td>
										 </tr>
										<tr>
											<td valign='top' id='firstcol'>Nôi dung hoạt động</td>
											<td></td>
										</tr>
										<tr>
											<td colspan='2' style='background-color:white'><p>$row[NOIDUNGHD]</p></td>
										</tr>
										";
										if($_SESSION['mahv']==$row['MAHV'])
											echo "<tr>
													<td colspan='2' align='right' valign='bottom'><button type='submit' value='cập nhật' />Cập nhật</button></td>
												</tr>";
										
									echo "</table>";
						}
						   ?> 
				</fieldset>
				
			</form> 
		</div>
	</div>
</div>
<body>
</body>
</html>
s